package com.scorpio.order.service.impl;

import java.util.Arrays;
import java.util.List;

import org.springframework.stereotype.Service;
import com.scorpio.order.mapper.OrderGoodsMapper;
import com.scorpio.order.domain.OrderGoodsEntity;
import com.scorpio.order.service.OrderGoodsService;
import com.scorpio.common.service.impl.BaseServiceImpl;
import org.springframework.transaction.annotation.Transactional;

/**
 * 订单商品Service业务层处理
 *
 * @author scorpio
 * @date 2021-11-29
 */
@Service
public class OrderGoodsServiceImpl extends BaseServiceImpl<OrderGoodsMapper, OrderGoodsEntity> implements OrderGoodsService {

    //新增
    @Override
    @Transactional(rollbackFor = Exception.class)
    public int save(OrderGoodsEntity entity) {
        return baseDao.insert(entity);
    }

    @Override
    public List<OrderGoodsEntity> selectByOrder(Long oid) {
        return baseDao.selectByOrder(oid);
    }

}
